//      fm.h
//      
//      Copyright 2011 DJ Shaji <djshaji@gmail.com>
//      
//      This program is free software; you can redistribute it and/or modify
//      it under the terms of the GNU General Public License as published by
//      the Free Software Foundation; either version 2 of the License, or
//      (at your option) any later version.
//      
//      This program is distributed in the hope that it will be useful,
//      but WITHOUT ANY WARRANTY; without even the implied warranty of
//      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//      GNU General Public License for more details.
//      
//      You should have received a copy of the GNU General Public License
//      along with this program; if not, write to the Free Software
//      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
//      MA 02110-1301, USA.


#include <april/april.h>
#include "explorer.h"

gint fm_sort_by_type ( GtkTreeModel * store, GtkTreeIter * iter1, GtkTreeIter * iter2 ) ;
GtkTreeModel * fm_create_store ( void ) ;
gint fm_sort_func ( gchar * data1, gchar * data2 ) ;

typedef enum _FileType {
	FOLDER,
	AUDIO,
	VIDEO,
	IMAGE,
	TEXT,
	HTML,
	UNKNOWN
} FileType ;

gint fm_get_id ( const gchar * filename ) ;
FileType fm_get_file_type ( const gchar * filename ) ;

GdkPixbuf * fm_get_icon ( gchar * filename ) ;

void fm_open ( Explorer * e, gchar * folder ) ;

GtkMenu * fm_create_menu_file ( Explorer * e ) ;
GtkMenu * fm_create_menu_edit ( Explorer * e ) ;
GtkMenu * fm_create_menu_view ( Explorer * e ) ;
GtkMenu * fm_create_menu_go ( Explorer * e ) ;
GtkMenu * fm_create_menu_favorites ( Explorer * e ) ;
GtkMenu * fm_create_menu_help ( Explorer * e ) ;

GtkMenu * fm_create_menu_context_folder ( Explorer * e ) ;
GtkMenu * fm_create_menu_context_file ( Explorer * e ) ;
GtkMenu * fm_create_menu_context_desktop ( Explorer * e ) ;
GtkMenu * fm_create_menu_context_desktop_file ( Explorer * e ) ;

void fm_go_forward ( Explorer * e ) ;
void fm_go_back ( Explorer * e ) ;
void fm_go_up ( Explorer * e ) ;
void fm_icon_view_activated ( GtkWidget * icon_view, GtkTreePath * path, Explorer * e ) ;
void fm_refresh ( Explorer * e ) ;
void fm_append_to_store ( Explorer * e, gchar * filename ) ;
gboolean fm_handle_context_menu ( GtkWidget * widget, GdkEventButton * event, Explorer * e ) ;


Sendto * sendto_new ( Explorer * e, SendtoTargets target ) ;
void sendto_destroy ( Sendto * sendto ) ;
gboolean fm_pop_menu ( GtkWidget * widget, GdkEventKey * event, Explorer * e ) ;
void _hide_unhide_components_by_menu ( GtkWidget * widget, GtkWidget * component ) ;

void fm_switch_icon_size_small ( Explorer * e ) ;
void fm_switch_icon_size_list ( Explorer * e ) ;
void fm_switch_icon_size_details ( Explorer * e ) ;
void fm_switch_icon_size_default ( Explorer * e ) ;
